package com.junzhiit.nengji.shop.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.bainaeco.framework.util.AssertUtil;
import com.junzhiit.nengji.shop.service.WechatConfigService;
import com.junzhiit.nengji.shop.web.vo.ResultVO;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/wechat/config")
public class WechatConfigController extends BaseController {
	
	@Autowired
	private WechatConfigService wechatConfigService;
	
	@ApiOperation(value = "根据appId获取微信配置信息")
	@RequestMapping(value="/{wcId}", method = RequestMethod.GET)
	public ResultVO getWechatConfigByAppId(@PathVariable String wcId){
		AssertUtil.notBlank(wcId, "wcId is required.");
		return wechatConfigService.getWechatConfigByAppId(wcId);
	}
}
